﻿cd (Split-Path $MyInvocation.InvocationName)
if (Test-Path Release) {
    if (!(Test-Path "Release\Usb")) {
        md "Release\Usb"
    }
    if (!(Test-Path "Release\PSModule")) {
        md "Release\PSModule"
    }
    copy .\cgi-bin\powerchumby.cgi "Release\Usb" -Force
    copy .\debugchumby "Release\Usb" -Force
    copy .\Readme.txt Release -Force
    copy '.\Release Notes.txt' Release -Force
    copy .\PSModule\* "Release\PSModule" -Recurse -Force
}
else {
    Write-Error "Release directory not found"
}
